using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NTTHAO.Web.BL.Rss;
using NTTHAO.CommonWeb;

public partial class admin_webparts_Plug_ins_RssNews_RssMenuDetail : System.Web.UI.UserControl
{
    public RssPageGroup _Group = null;
    public RssMenu _Menu = null;
    public DataTable _List = null;

    protected void Page_Load(object sender, EventArgs e)
    {
        int siteID = WebGlobal.GetSite().ID;
        int langID = LanguageUtility.GetLanguageID();
        bool isAdmin = Context.User.Identity.Name.Equals("admin", StringComparison.OrdinalIgnoreCase);
        try
        {
            _Group = new RssPageGroup(Convert.ToInt32(Request.QueryString["g"].Trim()));
            _Menu = new RssMenu(Convert.ToInt32(Request.QueryString["m"].Trim()));
            if (_Group.ID < 1 || _Menu.ID < 1)
            {
                throw new Exception("This function is invalid.");
            }
            _List = RssMenuLink.GetAllLinks(_Menu.ID, langID, isAdmin ? -1 : 1);
        }
        catch 
        {
            Response.Redirect("?type=invalidurl&ReturnUrl=" + Server.UrlEncode(Request.RawUrl), false);
            return;
        }
    }
}